/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Modelos;

import java.io.Serializable;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author luisramirezmartinez SAMI 2011
 *
 */
@Entity
@Table(name = "tbl_pantallas_perfiles")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TblPantallasPerfiles.findAll", query = "SELECT t FROM TblPantallasPerfiles t"),
    @NamedQuery(name = "TblPantallasPerfiles.findByIdpantallaperfil", query = "SELECT t FROM TblPantallasPerfiles t WHERE t.idpantallaperfil = :idpantallaperfil"),
    @NamedQuery(name = "TblPantallasPerfiles.findByModificar", query = "SELECT t FROM TblPantallasPerfiles t WHERE t.modificar = :modificar"),
    @NamedQuery(name = "TblPantallasPerfiles.findByEstatus", query = "SELECT t FROM TblPantallasPerfiles t WHERE t.estatus = :estatus")})
public class TblPantallasPerfiles implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "Id_pantalla_perfil")
    private Integer idpantallaperfil;
    @Column(name = "Modificar")
    private Boolean modificar;
    @Column(name = "Estatus")
    private Boolean estatus;
    @JoinColumn(name = "Id_perfil", referencedColumnName = "Id_perfil")
    @ManyToOne(optional = false)
    private TblPerfiles tblperfilesIdperfil;
    @JoinColumn(name = "Id_pantalla", referencedColumnName = "Id_pantalla")
    @ManyToOne(optional = false)
    private TblPantallas tblpantallasIdpantalla;
    public TblPantallasPerfiles(){

    }

    public TblPantallasPerfiles(Integer idpantallaperfil) {
        this.idpantallaperfil = idpantallaperfil;
    }

    public TblPantallasPerfiles(Integer idpantallaperfil,Boolean modificar, Boolean estatus, TblPerfiles tblperfilesIdperfil, TblPantallas tblpantallasIdpantalla) {
        this.modificar = modificar;
        this.estatus = estatus;
        this.tblperfilesIdperfil = tblperfilesIdperfil;
        this.tblpantallasIdpantalla = tblpantallasIdpantalla;
        this.idpantallaperfil=idpantallaperfil;
    }
    
    
    
    

    public Integer getIdpantallaperfil() {
        return idpantallaperfil;
    }

    public void setIdpantallaperfil(Integer idpantallaperfil) {
        this.idpantallaperfil = idpantallaperfil;
    }

    public Boolean getModificar() {
        return modificar;
    }

    public void setModificar(Boolean modificar) {
        this.modificar = modificar;
    }

    public Boolean getEstatus() {
        return estatus;
    }

    public void setEstatus(Boolean estatus) {
        this.estatus = estatus;
    }

    public TblPerfiles getTblperfilesIdperfil() {
        return tblperfilesIdperfil;
    }

    public void setTblperfilesIdperfil(TblPerfiles tblperfilesIdperfil) {
        this.tblperfilesIdperfil = tblperfilesIdperfil;
    }

    public TblPantallas getTblpantallasIdpantalla() {
        return tblpantallasIdpantalla;
    }

    public void setTblpantallasIdpantalla(TblPantallas tblpantallasIdpantalla) {
        this.tblpantallasIdpantalla = tblpantallasIdpantalla;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idpantallaperfil != null ? idpantallaperfil.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TblPantallasPerfiles)) {
            return false;
        }
        TblPantallasPerfiles other = (TblPantallasPerfiles) object;
        if ((this.idpantallaperfil == null && other.idpantallaperfil != null) || (this.idpantallaperfil != null && !this.idpantallaperfil.equals(other.idpantallaperfil))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Modelos.TblPantallasPerfiles[ idpantallaperfil=" + idpantallaperfil + " ]";
    }

}
